typedef int coord_t;         // coordinate type
typedef long long coord2_t;  // must be big enough to hold 2*max(|coordinate|)^2

typedef struct {
  	coord_t x, y;
} point_t;

coord2_t cross(const point_t O, const point_t A, const point_t B);

/* Prototype function of "convex_hull"
Input Parameters:  
N ... a constant, must be known at compile time (in our example e.g. 20)
point_t *P ... a pointer to an point_t array of size N with N 2D-points, 
must be sorted by x-coordinates in increasing order, when there are points with
the same x-coordinate then sort by y coordinates in increasing order.
point_t *H ... a pointer to an point_t array of size 2*N, must be empty (0,0)

When using the function the parameter N has to be fixed in advance (compile time). 
The optimized code is in single path version, so the time to execute the function is
independent of the points in the array P. The array H is used to store the points of
which the convex hull is made of. 

Our test was with an parameter N = 20. We measured about 66000 execution cycles. 
With N = 10 there would be only 66000/5 execution cycles, with N = 40 there would be
66000*5 execution cycles. 
*/
void convex_hull(int N, point_t *P, point_t *H);

